<script setup lang="ts">
import { useDark, useLocalStorage } from '@vueuse/core'
import { ElConfigProvider } from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
const locale = ref(zhCn)
const size = useLocalStorage('element-size', 'default') as unknown as
  | ''
  | 'small'
  | 'default'
  | 'large'
const isDark = useDark()
console.log(size)

document.documentElement.classList.toggle('dark', isDark.value)
</script>

<template>
  <el-config-provider :locale="locale" :size="size">
    <router-view />
  </el-config-provider>
</template>

<style></style>
